package com.hentai.androidserver.configration;

import com.hentai.androidserver.interceptor.AndroidInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Slf4j
@Configuration
public class AndroidServiceConfig implements WebMvcConfigurer {
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AndroidInterceptor()).addPathPatterns("/**");

        WebMvcConfigurer.super.addInterceptors(registry);

        log.info("interceptor loaded");
    }
}
